<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Jialeo\LaravelSchemaExtend\Schema;

class CreateCruiseCheckRiskConfigTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('cruise_check_risk_problem', function (Blueprint $table) {
            $table->id();
            $table->string('problemName', 128)->default('')->comment('问题描述');
            $table->unsignedInteger('riskType2')->default(0)->comment('风险类型二级');
            $table->string('riskName2', 64)->default(0)->comment('风险类型二级名称');
            $table->string('riskType1')->default('')->comment('风险类型一级');
            $table->string('riskName1')->default('')->comment('风险类型一级名称');


            $table->unsignedInteger('createdAt')->default(0)->comment('创建时间');
            $table->collation = 'utf8mb4_general_ci';
            $table->comment = '巡检项 - 风险类型配置表';
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('cruise_check_risk_problem');
    }
}
